import request from "@/utils/request";
//获取公告列表
export const getNoticeListAPI = (pageNo,pageSize) => request.get(`/call/list?pageNo=${pageNo}&pageSize=${pageSize}`)
//创建公告或者修改公告
export const CreateOrUpdateNoticeAPI = (data) => {
    if(data.id) {
        return request.put(`/call/update?id=${data.id}`,data)
    }else {
       return request.post(`/call/create`,data)
    }
}
//获取公告详情
export const getNoticeDetailAPI = (id) => request.get(`/call/detail?id=${id}`)
//删除公告的回调
export const deleteNoticeAPI = (id)=> request.delete(`/call/delete?id=${id}`)